package com.hiwan.system.dao.data;

import java.util.List;

import org.framework.dao.ServiceUtilDao;
import org.springframework.stereotype.Component;
import org.springframework.stereotype.Repository;
import org.springframework.stereotype.Service;

import com.hiwan.system.pojo.DataInfo;

@Component
@Service
@Repository
public class DataDao extends ServiceUtilDao {
	/**
	 * 新增数据
	 * 
	 * @param DataInfo
	 * @return
	 */
	public int insertDataInfo(DataInfo dataInfo) {
		return insert("insertDataInfo", dataInfo);
	}

	/**
	 * 修改数据
	 * 
	 * @param DataInfo
	 * @return
	 */
	public int updateDataInfo(DataInfo dataInfo) {
		return update("updateDataInfo", dataInfo);
	}

	/**
	 * 删除数据
	 * 
	 * @param DataId
	 * @return
	 */
	public int deleteDataInfo(String dataId) {
		return delete("deleteDataInfo", dataId);
	}
	
	/**
	 * 查询数据
	 * @param busiId
	 * @return
	 */
	public DataInfo selectDataInfoById(String busiId){
		return this.selectOne("selectDataInfo", busiId, DataInfo.class);
	}
	
	public List<DataInfo> selectDataInfoList(DataInfo dataInfo){
		return this.selectList("selectDataInfoList", dataInfo, DataInfo.class);
	}

}
